<?php

/**
 * 后台首页控制器
 *
 * @author Fong.zhang
 */
namespace Home\Controller;

class HomeController extends BaseController
{
    public function indexAction()
    {
        if (!session('location')) session('location', '全国');

        $this->display();
    }

    public function selectLocationAction () {
        $error = '';
        $location = I('post.location');

        session('location', $location);

        $this->ajaxReturn(array(
            'error' => $error
        ));
    }
}